package com.atguigu.gmall.service.impl;

import com.atguigu.gmall.bean.Person;
import com.atguigu.gmall.service.PersonService;
import org.springframework.util.StringUtils;

import java.util.List;

/**
 * @author Jerry.Su
 * @Date 2022/2/17 16:59
 */
public class PersonServiceStub implements PersonService {

    private final PersonService personService;

    public PersonServiceStub(PersonService personService) {
        this.personService = personService;
    }

    @Override
    public List<Person> getPersonListByOrderId(String orderId) {
        System.out.println("person service 本地存根被调用");
        if (!StringUtils.isEmpty(orderId)) {
            return personService.getPersonListByOrderId(orderId);
        }
        return null;
    }
}
